limited with v8.Class_Object, v8.Class_Value, v8.Class_String;
package v8.Class_Accessor_Info is
   type Accessor_Info (<>) is tagged limited private;
   -- The information passed to an accessor callback about the context
   -- of the property access.

   function Data (this : Accessor_Info) return v8.Class_Value.Pointer;
   -- extra data startup by Object::Set_Accessor

   function This (this : Accessor_Info) return v8.Class_Object.Pointer;
   -- object who is visiting the property

   function Holder (this : Accessor_Info) return  v8.Class_Object.Pointer;  -- ../include/v8.h:4182
                                                                            -- property holder object


   -- Accessor[Getter|Setter] are used as callback functions when
   -- setting|getting a particular property. See Object and Object_Template's
   -- method Set_Accessor.
   type Accessor_Getter is access function
     (property      : v8.Class_String.Pointer; -- Local<String>
      info          : v8.Class_Accessor_Info.Accessor_Info
     ) return v8.Class_Value.Pointer; -- Handle<Value>
   type Accessor_Setter is access procedure
     (property      : v8.Class_String.Pointer; -- Local<String>
      value         : v8.Class_Value.Pointer; -- Local<Value>
      info          : v8.Class_Accessor_Info.Accessor_Info);


private
   type Accessor_Info is tagged limited null record;

   function Get_Accessor_Data (AI : access uint32_t) return uint32_t;
   function Get_Accessor_This (AI : access uint32_t) return uint32_t;
   function Get_Accessor_Holder(AI : access uint32_t) return uint32_t;

   for Data'Address use Get_Accessor_Data'Address;
   for This'Address use Get_Accessor_This'Address;
   for Holder'Address use Get_Accessor_Holder'Address;

   pragma Import (Ada, Data);
   pragma Import (Ada, This);
   pragma Import (Ada, Holder);


   pragma Convention (CPP, Accessor_Getter);
   pragma Convention (CPP, Accessor_Setter);

end v8.Class_Accessor_Info;
